#处理用户输入信息
ins = input("请输入省份和需要查找的项目(中间用空格隔开)：")
insl = ins.split(" ")

#读取文件信息
fo = open("xiaofei.csv","r")
lsit = list()
for line in fo:
    x = line.split(",")
    lsit.append(x)
lsit[0][-1] = "其他用品及服务"
print(lsit[0])
#处理整合信息
nus = []          #记录什么东西的数组
city = []
for inl in insl[1:]:
    index = lsit[0].index(inl)
    nus.append(index)
for cit in lsit:
    if(cit[0] == insl[0]):
        city = cit

#打印信息
print("你输入的城市是：{}".format(insl[0]))
for nuss in nus:
    print("{}的消费金额为：{}".format(lsit[0][nuss],city[nuss]))
